home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / envtime.zip / ENVTIME.DOC next >
Text File  |  1993-01-01  |  2KB  |  70 lines

  1.                                 ENVTIME
  2.  
  3.                             Copyright 1992
  4.                             Steve Antonoff
  5.                           Stone Mountain, GA
  6.  
  7.              Released for FREE, NONCOMMERCIAL use and distribution.
  8.  
  9. ENVTIME allows the user to create environment varialbles that contain
  10. the current date and time.  These variables can then be used to make
  11. decisions or to create file names, etc, in BATch files.
  12.  
  13. ENVTIME is simple to use.  The output is a series of "SET" commands that
  14. must be redirected to a BAT file, then the BAT file executed.  For
  15. example, in the file "MAIN.BAT", insert the following lines:
  16.  
  17. envtime > settime.bat
  18. call settime
  19. del settime.bat
  20.  
  21. Notice the use of "CALL" so that MAIN.BAT resumes operation after
  22. SETTIME.BAT is executed.  This will only work in DOS 3.3 and higher.
  23.  
  24. The batch file created will look like:
  25.  
  26. @echo off
  27. Set YEAR=1992
  28. Set PYEAR=1991
  29. Set YR=92
  30. Set PYR=91
  31. Set MON=07
  32. Set DOM=18
  33. Set DOW=Sat
  34. Set HOUR=12
  35. Set MIN=01
  36. Set YDOM=17
  37. Set YMON=07
  38. Set YYEAR=1992
  39. Set YYR=92
  40.  
  41. Thus, the environment variables created will be:
  42.         YEAR  - 4 digit year
  43.         PYEAR - 4 digit previous year
  44.         YR    - 2 digit year
  45.         PYR   - 2 digit previous year
  46.         MON   - 2 digit month
  47.         DOM   - 2 digit day of month
  48.         DOW   - 3 character day of week (Sun, etc)
  49.         HOUR  - 2 digit hour of day
  50.         MIN   - 2 digit minute of hour
  51.         YDOM  - 2 digit yesterday day of month
  52.         YMON  - 2 digit yesterday month
  53.         YYEAR - 4 digit yesterday year
  54.         YYR   - 2 digit yesterday year
  55.  
  56. All numeric variables will include a leading zero, if necessary, to fill
  57. the field.  For example, at 1AM the HOUR variable will be set to 01.
  58.  
  59. This program is released for FREE, NON-COMMERCIAL use and distribution.
  60. All other uses requrire written permission from the author.
  61.  
  62. Requests for commercial use, suggestions, etc, may be sent to:
  63.  
  64.         Steve Antonoff
  65.         3917 Garfield Dr.
  66.         Stone Mountain, GA  30083
  67.  
  68. FIDOnet address: 1:133/302@fidonet
  69.  
  70.